Skip to content

Conversation

@zaneb
Copy link
Member

@zaneb zaneb commented Jan 24, 2023

Invert the dependencies of the Agent installer's InstallConfig and the IPI/UPI InstallConfig, so that both embed an InstallConfigBase struct, rather the the agent installer overriding parts of the regular InstallConfig.

This allows us to call the validation code from separate places, passing different arguments so that we can run different validations for the agent-based installer (which supports different platform-specific options). Previously this was achieved by parsing the command-line arguments looking for agent, which is unreliable without access to the full CLI library and command definitions, and doesn't work in unit tests.

/hold
Depends on #6793 (which will be backported to 4.12, while this will not).

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 24, 2023

@zaneb: This pull request references AGENT-526 which is a valid jira issue.

Details

In response to this:

Invert the dependencies of the Agent installer's InstallConfig and the IPI/UPI InstallConfig, so that both embed an InstallConfigBase struct, rather the the agent installer overriding parts of the regular InstallConfig.

This allows us to call the validation code from separate places, passing different arguments so that we can run different validations for the agent-based installer (which supports different platform-specific options). Previously this was achieved by parsing the command-line arguments looking for agent, which is unreliable without access to the full CLI library and command definitions, and doesn't work in unit tests.

/hold
Depends on #6793 (which will be backported to 4.12, while this will not).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 24, 2023
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2023
@openshift-ci openshift-ci bot requested review from andfasano and dhellmann January 24, 2023 10:39
@zaneb zaneb force-pushed the agent-install-config branch 2 times, most recently from 9a63e49 to b2127a0 Compare January 25, 2023 04:48
@zaneb zaneb force-pushed the agent-install-config branch from 1994484 to 107f1d9 Compare February 2, 2023 21:48
@zaneb
Copy link
Member Author

zaneb commented Feb 2, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 2, 2023
@zaneb
Copy link
Member Author

zaneb commented Feb 12, 2023

/retest-required

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this boolean has been kept to maintain the same previous behavior (cherry-picking the specific validations to enable/disable). This refactoring could open the possibility in the future to change approach and prepare the installconfig accordingly before the validation step.

nit: agentMethod is a little bit confusing, since it's not a method... I'd suggest to keep the previous agentBasedInstallation

@andfasano
Copy link
Contributor

andfasano commented Feb 16, 2023

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 16, 2023

@andfasano: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test agent-integration-tests
  • /test aro-unit
  • /test e2e-agent-compact-ipv4
  • /test e2e-aws-ovn
  • /test e2e-aws-ovn-upi
  • /test e2e-azure-ovn
  • /test e2e-azure-ovn-upi
  • /test e2e-gcp-ovn
  • /test e2e-gcp-ovn-upi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-openstack-ovn
  • /test e2e-vsphere-ovn
  • /test e2e-vsphere-upi
  • /test gofmt
  • /test golint
  • /test govet
  • /test images
  • /test okd-images
  • /test okd-scos-images
  • /test okd-unit
  • /test okd-verify-codegen
  • /test openstack-manifests
  • /test shellcheck
  • /test tf-lint
  • /test unit
  • /test verify-codegen
  • /test verify-vendor
  • /test yaml-lint

The following commands are available to trigger optional jobs:

  • /test e2e-agent-ha-dualstack
  • /test e2e-agent-sno-ipv6
  • /test e2e-alibaba
  • /test e2e-aws-ovn-disruptive
  • /test e2e-aws-ovn-fips
  • /test e2e-aws-ovn-imdsv2
  • /test e2e-aws-ovn-proxy
  • /test e2e-aws-ovn-shared-vpc
  • /test e2e-aws-ovn-single-node
  • /test e2e-aws-ovn-upgrade
  • /test e2e-aws-ovn-workers-rhel8
  • /test e2e-aws-upi-proxy
  • /test e2e-azure-ovn-resourcegroup
  • /test e2e-azure-ovn-shared-vpc
  • /test e2e-azurestack
  • /test e2e-azurestack-upi
  • /test e2e-crc
  • /test e2e-gcp-ovn-shared-vpc
  • /test e2e-gcp-ovn-xpn
  • /test e2e-gcp-secureboot
  • /test e2e-gcp-upgrade
  • /test e2e-gcp-upi-xpn
  • /test e2e-ibmcloud-ovn
  • /test e2e-libvirt
  • /test e2e-metal-assisted
  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-sdn
  • /test e2e-metal-ipi-sdn-swapped-hosts
  • /test e2e-metal-ipi-sdn-virtualmedia
  • /test e2e-metal-single-node-live-iso
  • /test e2e-nutanix-ovn
  • /test e2e-nutanix-sdn
  • /test e2e-openstack-kuryr
  • /test e2e-openstack-proxy
  • /test e2e-openstack-sdn-parallel
  • /test e2e-openstack-upi
  • /test e2e-ovirt-sdn
  • /test e2e-vsphere-upi-zones
  • /test e2e-vsphere-zones
  • /test okd-e2e-aws-ovn
  • /test okd-e2e-aws-ovn-upgrade
  • /test okd-e2e-gcp
  • /test okd-e2e-gcp-ovn-upgrade
  • /test okd-e2e-vsphere
  • /test okd-scos-e2e-aws-ovn
  • /test okd-scos-e2e-aws-upgrade
  • /test okd-scos-e2e-gcp
  • /test okd-scos-e2e-gcp-ovn-upgrade
  • /test okd-scos-e2e-vsphere
  • /test okd-scos-unit
  • /test okd-scos-verify-codegen
  • /test tf-fmt

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-installer-master-agent-integration-tests
  • pull-ci-openshift-installer-master-aro-unit
  • pull-ci-openshift-installer-master-e2e-agent-compact-ipv4
  • pull-ci-openshift-installer-master-e2e-agent-ha-dualstack
  • pull-ci-openshift-installer-master-e2e-agent-sno-ipv6
  • pull-ci-openshift-installer-master-e2e-aws-ovn
  • pull-ci-openshift-installer-master-e2e-aws-ovn-upgrade
  • pull-ci-openshift-installer-master-e2e-aws-ovn-workers-rhel8
  • pull-ci-openshift-installer-master-e2e-metal-assisted
  • pull-ci-openshift-installer-master-e2e-metal-ipi-ovn-dualstack
  • pull-ci-openshift-installer-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-installer-master-e2e-metal-ipi-sdn
  • pull-ci-openshift-installer-master-e2e-metal-ipi-sdn-swapped-hosts
  • pull-ci-openshift-installer-master-e2e-metal-ipi-sdn-virtualmedia
  • pull-ci-openshift-installer-master-e2e-metal-single-node-live-iso
  • pull-ci-openshift-installer-master-e2e-vsphere-ovn
  • pull-ci-openshift-installer-master-e2e-vsphere-upi-zones
  • pull-ci-openshift-installer-master-gofmt
  • pull-ci-openshift-installer-master-golint
  • pull-ci-openshift-installer-master-govet
  • pull-ci-openshift-installer-master-images
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn-upgrade
  • pull-ci-openshift-installer-master-okd-images
  • pull-ci-openshift-installer-master-okd-scos-e2e-aws-ovn
  • pull-ci-openshift-installer-master-okd-scos-e2e-aws-upgrade
  • pull-ci-openshift-installer-master-okd-scos-images
  • pull-ci-openshift-installer-master-okd-scos-unit
  • pull-ci-openshift-installer-master-okd-scos-verify-codegen
  • pull-ci-openshift-installer-master-okd-unit
  • pull-ci-openshift-installer-master-okd-verify-codegen
  • pull-ci-openshift-installer-master-shellcheck
  • pull-ci-openshift-installer-master-tf-fmt
  • pull-ci-openshift-installer-master-tf-lint
  • pull-ci-openshift-installer-master-unit
  • pull-ci-openshift-installer-master-verify-codegen
  • pull-ci-openshift-installer-master-verify-vendor
  • pull-ci-openshift-installer-master-yaml-lint
Details

In response to this:

/retest required

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@andfasano
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2023
@r4f4
Copy link
Contributor

r4f4 commented Feb 22, 2023

/approve

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 22, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2023
@zaneb zaneb force-pushed the agent-install-config branch from 107f1d9 to b263c12 Compare February 27, 2023 01:33
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2023
Refactor unit tests to use installconfig.MakeAsset() to generate an
installconfig.InstallConfig asset from a types.InstallConfig.
Split the parts of the InstallConfig asset consumed by the agent
installer out into a separate AssetBase struct, so that the agent
installer need not embed the whole of InstallConfig. This will allow us
to do different validations where necessary in the agent installer.
Instead of embedding the full InstallConfig struct, just embed the
common base struct.
Instead of trying to infer the installation method from an unreliable
parsing of the command line arguments, pass a flag to explicitly
identify the agent-based install method.
@zaneb zaneb force-pushed the agent-install-config branch from b263c12 to ddd644e Compare February 27, 2023 03:48
@bfournie
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 685a14d and 2 for PR HEAD ddd644e in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5b4ad0f and 1 for PR HEAD ddd644e in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 28, 2023

@zaneb: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-disruptive 107f1d904b33c9b96aed264f854c58372e920f5c link false /test e2e-aws-ovn-disruptive
ci/prow/okd-e2e-aws-ovn-upgrade ddd644e link false /test okd-e2e-aws-ovn-upgrade
ci/prow/e2e-metal-ipi-sdn-virtualmedia ddd644e link false /test e2e-metal-ipi-sdn-virtualmedia
ci/prow/okd-scos-e2e-aws-upgrade ddd644e link false /test okd-scos-e2e-aws-upgrade

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@zaneb
Copy link
Member Author

zaneb commented Feb 28, 2023

/test e2e-metal-ipi-ovn-ipv6
/test e2e-aws-ovn

@openshift-merge-robot openshift-merge-robot merged commit 05a6325 into openshift:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants